// BWConfigTemplate -- configuration templates & management

#import <Cocoa/Cocoa.h>

// configuration templates are plists that live in 
// ApplicationSupport/AppName/CategoryName/*

@interface BWConfigTemplate : NSObject
{
    NSString *category;
    NSString *name;
    NSMutableDictionary *attributes;
}

+ (void) setApplicationName: (NSString *) appName;

+ (BWConfigTemplate *) newTemplateInCategory: (NSString *) categoryName
                                        name: (NSString *) templateName;

+ (NSArray *) namesForCategory: (NSString *) categoryName;

+ (BWConfigTemplate *) loadTemplateForCategory: (NSString *) categoryName
                                          name: (NSString *) templateName;

// client is done making changes, save that pupper
- (void) save;

// use KVC with plist values with returned value
// and this is a convenience
- (void) setFloatValue: (float) value
                forKey: (NSString *) key;
- (float) floatValueForKey: (NSString *) key;

- (void) setIntValue: (int) value
              forKey: (NSString *) key;
- (int) intValueForKey: (NSString *) key;

- (void) setBoolValue: (BOOL) value
               forKey: (NSString *) key;
- (BOOL) boolValueForKey: (NSString *) key;

- (void) setObjectValue: (id<NSCoding>) value
                 forKey: (NSString *) key;
- (id) objectValueForKey: (NSString *) key;

- (void) setStringValue: (NSString *) value
                 forKey: (NSString *) key;
- (NSString *) stringValueForKey: (NSString *) key;

@end // BWConfigTemplate

